﻿using System;
using System.Collections.Generic;
using System.Text;
using BF.Model;
using BF.Infrastructure;
using System.Linq.Expressions;

namespace BF.IBLL.Dictionary
{
    public interface Idic_OrganizationBLL
    {
        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        bool Add(dic_Organization entity);

        bool Add(List<dic_Organization> list);
        //bool Add(List<dic_Hospital> sysAreaList, List<dic_Hospital> updateList);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        bool Update();

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        bool Delete(dic_Organization entity);

        /// <summary>
        /// 多条件删除
        /// </summary>
        /// <param name="predicate"></param>
        /// <returns></returns>
        bool Delete(System.Linq.Expressions.Expression<Func<Model.dic_Organization, bool>> predicate);

        /// <summary>
        /// 获取实体
        /// </summary>
        /// <param name="gID"></param>
        /// <returns></returns>
        dic_Organization GetModel(Guid gID);

        dic_Organization GetModelByCondition(Expression<Func<dic_Organization, bool>> where);

        /// <summary>
        /// 获取验证实体
        /// </summary>
        /// <param name="gID"></param>
        /// <returns></returns>
        dic_Organization GetModel(Guid? gID, string sCode);

        /// <summary>
        /// 获取医疗机构列表
        /// </summary>
        /// <param name="where">条件</param>
        /// <param name="orderBy">排序字段</param>
        /// <param name="pageModel">分页实体</param>
        /// <param name="isAscending">是否升序排列</param>
        /// <returns></returns>
        List<dic_Organization> GetList(Expression<Func<Model.dic_Organization, bool>> where, Expression<Func<dic_Organization, object>> orderBy, PageModel pageModel, bool isAscending);

        /// <summary>
        /// 获取医疗机构列表
        /// </summary>
        /// <param name="where">条件</param>
        List<dic_Organization> GetList(Expression<Func<Model.dic_Organization, bool>> where);

        /// <summary>
        /// 获取分页总数
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        int GetRowCount(Expression<Func<dic_Organization, bool>> where);

        /// <summary>
        ///获取上级机构编码,仅限卫生室
        /// </summary>
        /// <returns></returns>
        List<dic_Organization> GetHigherCode();
    }
}
